<?php

namespace common\models\credit_app_tables;

use Yii;

/**
 * This is the model class for table "{{%order_up}}".
 *
 * @property integer $up_id
 * @property integer $up_oid
 * @property string $up_type
 * @property string $up_info
 * @property integer $up_uid
 * @property string $up_uname
 * @property integer $up_time
 * @property string $up_reason
 * @property integer $up_vf_uid
 * @property string $up_vf_uname
 * @property integer $up_vf_time
 * @property string $up_status
 * @property string $up_remark
 */
class OrderUp extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%order_up}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_app');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['up_oid', 'up_info', 'up_uid', 'up_uname', 'up_time', 'up_reason', 'up_vf_uid', 'up_vf_uname', 'up_vf_time', 'up_remark'], 'required'],
            [['up_oid', 'up_uid', 'up_time', 'up_vf_uid', 'up_vf_time'], 'integer'],
            [['up_type', 'up_info', 'up_status'], 'string'],
            [['up_uname', 'up_vf_uname'], 'string', 'max' => 50],
            [['up_reason', 'up_remark'], 'string', 'max' => 200],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'up_id' => Yii::t('app', 'ID'),
            'up_oid' => Yii::t('app', '订单ID'),
            'up_type' => Yii::t('app', '修改申请要求人'),
            'up_info' => Yii::t('app', '需要修改的内容'),
            'up_uid' => Yii::t('app', '申请人id'),
            'up_uname' => Yii::t('app', '申请人'),
            'up_time' => Yii::t('app', '申请时间'),
            'up_reason' => Yii::t('app', '修改原因'),
            'up_vf_uid' => Yii::t('app', '复核人id'),
            'up_vf_uname' => Yii::t('app', '复核人'),
            'up_vf_time' => Yii::t('app', '复核时间'),
            'up_status' => Yii::t('app', '状态'),
            'up_remark' => Yii::t('app', '审核说明'),
        ];
    }
}
